<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
{#    <link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}" rel="external nofollow"  rel="external nofollow" >#}
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet"  type="text/css" href="/static/style.css" rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >
      <title>home</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/css/layui.css" tppabs="http://layui/dist/css/layui.css"  media="all">
    <link href="../static/layui/css/layui.css" rel="stylesheet">
</head>
<body>
{#<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">#}
{#  <legend>水平导航菜单</legend>#}
{#</fieldset>#}

<ul class="layui-nav">
  <li class="layui-nav-item layui-this"><a href="{{ url_for('index') }}">Home</a></li>
  <li class="layui-nav-item">
    <a href="{{ url_for('hard') }}">服务器信息</a>
  </li>
  <li class="layui-nav-item">
      <a href="">k8s集群管理</a>
      <dl class="layui-nav-child">
      <dd><a href="{{ url_for('k8s') }}">k8s集群信息</a></dd>
      <dd><a href="{{ url_for('new_deploy') }}">创建Yaml</a></dd>
      <dd><a href="{{ url_for('deploy') }}">预览编辑Yaml</a></dd>
    </dl>
  </li>
  <li class="layui-nav-item">
    <a href="javascript:;">数据中间件</a>
    <dl class="layui-nav-child">
      <dd><a href="{{ url_for('find') }}">Redis</a></dd>
      <dd><a href="{{ url_for('kafkaui') }}">kafka_ui</a></dd>
      <dd><a href="">MongoDB</a></dd>
      <dd><a href="">MySQL</a></dd>
    </dl>
  </li>
  <li class="layui-nav-item">
    <a href="javascript:;">运维自动化</a>
    <dl class="layui-nav-child">
      <dd><a href="{{ url_for('webssh') }}">web_ssh</a></dd>
      <dd class="layui-this"><a href="{{ url_for('crontab') }}">定时任务</a></dd>
      <dd><a href="{{ url_for('mssh') }}">自动化执行</a></dd>
    </dl>
  </li>
  <li class="layui-nav-item"><a href="{{ url_for('monitor') }}">监控平台</a></li>
  <li  class="layui-nav-item" style="float: right" ><a href="">{{ username }}</a>
      <dl class="layui-nav-child">
      <dd><a href="{{ url_for('logout') }}">注销</a></dd>
    </dl>
  </li>
</ul>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
  <legend>k8s集群管理信息</legend>
</fieldset>

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">集群节点信息</li>
    <li>Deployment清单</li>
    <li>集群Pod清单</li>
    <li>NameSpace信息</li>
    <li>Service信息</li>
    <li>路由信息</li>
  </ul>
  <div class="layui-tab-content" style="height: 100px;">
    <div class="layui-tab-item layui-show">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>IP地址</th>
        <th>Host name</th>
        <th>CPU</th>
        <th>Memory</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
    <tr>
        {% for k,v in info.items() %}
                <td>{{ v }}</td>
        {% endfor %}
                <td width="10px"><a href="#">删 除</a></td>
    </tr>
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
    </colgroup>
    <thead>
      <tr>
        <th>NameSpace</th>
        <th>Deployment name</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
        {% for d in dep %}
            <tr>
                <td>{{ d.namespace }}</td>
                <td>{{ d.name }}</td>
                <td width="10px"><a href="#">删 除</a></td></tr>
        {% endfor %}
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>Pod_ip</th>
        <th>NameSpace</th>
        <th>Pod name</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
        {% for i in pod %}
            <tr>
                <td>{{ i.podip }}</td>
                <td>{{ i.ns }}</td>
                <td>{{ i.pod_name }}</td>
                <td width="10px"><a href="#">删 除</a></td></tr>
        {% endfor %}
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>NameSpace</th>
        <th>操 作</th>
      </tr>
    </thead>
    <tbody>
        {% for n in ns %}
            <tr>
                <td>{{ n }}</td>
                <td width="10px"><a href="#">删 除</a></td></tr>
        {% endfor %}
    </tbody>
  </table>
</div>
    </div>
    <div class="layui-tab-item">
     <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
</fieldset>
<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="100">
      <col width="100">
      <col width="100">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>ServiceName</th>
        <th>Type</th>
        <th>NameSpace</th>
        <th>Cluster_Ip</th>
        <th>Port</th>
      </tr>
    </thead>
    <tbody>
        {% for s in svc %}

            <tr>
            {% for a,b in s.items() %}
                <td>{{ b }}</td>
                {% endfor %}
            </tr>

        {% endfor %}
    </tbody>
  </table>
  </div>


    </div>
    <div class="layui-tab-item">路由信息</div>
  </div>
</div>



<script src="../static/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
<script>
layui.use('element', function(){
  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

  //监听导航点击
  element.on('nav(demo)', function(elem){
    //console.log(elem)
    layer.msg(elem.text());
  });
});
</script>
</body>
</html>